﻿using Basic.FormRemoteModel.QueryTable;
using Basic.FormRemoteModel.QueryTable.Model;
using Basic.FormService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FormService.RpcEvent
{
    internal class PhyQueryTableEvent : IRpcApiService
    {
        private readonly IPhyQueryTableService _Service;

        public PhyQueryTableEvent ( IPhyQueryTableService service )
        {
            this._Service = service;
        }

        public long AddPhyQueryTable ( AddPhyQueryTable add )
        {
            return this._Service.Add(add.Datum);
        }

        public void DeletePhyQueryTable ( DeletePhyQueryTable obj )
        {
            this._Service.Delete(obj.Id);
        }

        public PhyQueryTableData GetPhyQueryTable ( GetPhyQueryTable obj )
        {
            return this._Service.Get(obj.Id);
        }
        public bool SetPhyQueryTable ( SetPhyQueryTable obj )
        {
            return this._Service.Set(obj.Id, obj.Datum);
        }
    }
}
